package com.beyond.trace.domain.storage;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @Description 出库记录表
 * @Author: EDY
 * @Date: 2023-04-14 13:49
 * @Version: 1.0.0
 */
@Data
@TableName("t_trace_jxc_decrease")
public class Decrease extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private String id;

    /** 出库编号 */
    @Excel(name = "出库编号")
    @ApiModelProperty(value = "出库编号")
    private String decreaseNo;

    /** 出库产品 */
    @Excel(name = "出库产品")
    @ApiModelProperty(value = "出库产品")
    private String decreaseName;

    /** 出库数量 */
    @Excel(name = "出库数量")
    @ApiModelProperty(value = "出库数量")
    @NotBlank(message = "出库数量不能为空，且不能为0")
    private String decreaseCount;

    /** 出库人 */
    @Excel(name = "出库人")
    @ApiModelProperty(value = "出库人")
    private String decreasePerson;

    /** 出库时间 */
    @Excel(name = "出库时间")
    @ApiModelProperty(value = "出库时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date decreaseTime;

    /** 单位 */
    @ApiModelProperty(value = "单位")
    private Integer unit;

    /** 删除标志 */
    @JsonIgnore
    @TableLogic
    private int delFlag;

    @ApiModelProperty(value = "部门id")
    @JsonIgnore
    private String departId;

}
